<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@page import="java.util.Date"%>
<%@page import="java.text.SimpleDateFormat"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@include file="/common/common.jspf"%>
	<script type="text/javascript" src="${ctx}/js/qc/nc/nc_add.js">
	
</script>
<style type="text/css">
.col-sm-3 {
	width: 15%;
	float: left;
}

.col-sm-9 {
	width: 85%;
	float: left;
}

label[class^="btn btn-default"] {
	margin-top: -4px;
}
</style>
</head>
<body>
	<div class="l_err" style="width: 100%; margin-top: 2px;"></div>
	<form id="form" name="form" class="form-horizontal" method="post"
		action="${ctx}/pi/pi_addEntity.shtml">
		<section class="panel panel-default">
		<div class="panel-body">
			<div class="form-group">
				<label class="col-sm-3 control-label">检验阶别</label>
				<div class="col-sm-9">
					<select  class="form-control" name="projectJcForMmap.ly_level" id="ly_level" >
						<option value="1">IQC</option>
						<%--<option value="2">FAl</option>--%>
						<%--<option value="1">OQC</option>--%>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">检验内容</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkabh" name="projectJcForMmap.ly_content" id="ly_content">
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">值域</label>
				<div class="col-sm-9">
					<select class="form-control" name="projectJcForMmap.ly_domain" id="ly_domain" >
						<option value="1">范围值</option>
						<option value="2">状态值</option>
						<option value="3">固定值</option>
						<option value="4">标准值</option>
					</select>
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">检验标准</label>
				<div class="col-sm-9">
					<input type="text" class="form-control checkName" readonly = "readonly"
						 name="projectJcForMmap.ly_standard"
						id="ly_standard">
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">上限</label>
				<div class="col-sm-9">
					<input type="text" class="form-control"
						name="projectJcForMmap.ly_on" id="ly_on">
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<div class="form-group">
				<label class="col-sm-3 control-label">下限</label>
				<div class="col-sm-9">
					<input type="text" class="form-control"
						   name="projectJcForMmap.ly_down" id="ly_down">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">单位</label>
				<div class="col-sm-9">
					<input type="text" class="form-control"
						   name="projectJcForMmap.ly_unit" id="ly_unit">
				</div>
			</div>
			<div class="line line-dashed line-lg pull-in"></div>
			<!-- 开始处理清单 -->
			<%--<div class="panel panel-default">--%>
				<%--<div class="panel-heading">--%>
					<%--<h3 class="panel-title">产品名称</h3>--%>
				<%--</div>--%>
				<%--<div class="panel-body">--%>
					<%--<table class="table table-bordered" >--%>
						<%--<thead>--%>
							<%--<tr>--%>
								<%--<th style="text-align: center; width:176px;">产品编码</th>--%>
								<%--<th style="text-align: center; width:135px;">产品名称</th>--%>
								<%--<th style="text-align: center; width:136px;">产品规格</th>--%>
								<%--<th style="text-align: center;"><input type="button"--%>
									<%--class="btn btn-primary" onclick="insert_row(this)" value="增加"></th>--%>
							<%--</tr>--%>
						<%--</thead>--%>
						<%--<tbody id="tbl">--%>
						<%--</tbody>--%>
					<%--</table>--%>
				<%--</div>--%>
			<%--</div>--%>

		</div>
		<footer class="panel-footer text-right bg-light lter">
		<button type="submit" class="btn btn-success btn-s-xs">提交</button>
		</footer> </section>
	</form>

	<script type="text/javascript">
		//$("#ly_standard").removeAttr("readonly");
		//根据不同的下拉框来检测状态
		$("#ly_domain").change(function(e){
			var options = $("#ly_domain option:selected");
			if(options.val() == 1){
				$("#ly_standard").attr("readonly","readonly");
				$("#ly_on").removeAttr("readonly");
				$("#ly_down").removeAttr("readonly");
				$("#ly_unit").removeAttr("readonly");
			}else if(options.val() == 2){
				$("#ly_standard").attr("readonly","readonly");
				$("#ly_on").attr("readonly","readonly");
				$("#ly_down").attr("readonly","readonly");
				$("#ly_unit").attr("readonly","readonly");
			}else if(options.val() == 3){
				$("#ly_on").removeAttr("readonly");
				$("#ly_unit").removeAttr("readonly");
			}else if(options.val() == 4){
				$("#ly_standard").removeAttr("readonly","readonly");
				$("#ly_standard").attr("readonly");
				$("#ly_on").attr("readonly","readonly");
				$("#ly_unit").attr("readonly","readonly");
			}
		});

		var i = 0
		// function insert_row(obj) {
		// 	i++;
		// 	R = tbl.insertRow(tbl.rows.length);
		// 	C = R.insertCell(0);
		// 	C.innerHTML = '<div class="input-group" style="width: 100px;"><input type="text" style="width: 120px;" class="form-control" name="item_no_1"id="item_no_1_'+i+'">'
		// 			+ '<span class="input-group-btn">'
		// 			+ '<button class="btn btn-info" id="workorder" type="button" style="height: 34px;"'
		// 			+ 'onclick="getItemChild(\'item_no_1_'+i+'\',\'item_name\');">'
		// 			+ '<span class="glyphicon glyphicon-search"></span></button></span></div>';
		// 	C = R.insertCell(1);
		// 	C.innerHTML = '<div class="input-group"><input type="text" class="form-control" name="item_use_number_11" id="item_use_number_11"></div>';
		// 	C = R.insertCell(2);
		// 	C.innerHTML = '<div class="input-group"><input type="text" class="form-control" name="item_balance_up_1" id="item_balance_up_1"></div>';
		// 	C = R.insertCell(3);
		// 	C.innerHTML = '<input type="button" class="btn btn-primary" onclick ="insert_row(this)" value = "增加">';
		// 	C = R.insertCell(5);
		// 	C.innerHTML = '<input type="button" class="btn btn-danger" onclick ="deleteRow(this)" value ="删除">';
		// }
		// function deleteRow(obj) {
		// 	var i = obj.parentNode.parentNode.rowIndex;
		// 	if (i > 0) {
		// 		tbl.deleteRow(i-1);
		// 	}
		// }



	</script>
</body>
</html>